Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 2 - Finder Objects / Object Class Definitions


Sharable Container

An object of class Sharable Container is a container that can be shared.

PROPERTIES
A sharable container has all the properties defined for object class Container
on page 42: Completely Expanded, Container Window, Entire Contents, Expandable, Expanded, Previous List View, Selection, and View.

Like any other container, a sharable container also has all the properties defined for object class Item on page 72: Bounds, Comment, Container, Content Space, Creation Date, Disk, Folder, Icon, ID, Information Window, Kind,
Label Index, Modification Date, Name, Physical Size, Position, Selected, Size, and Window.

Unlike other containers, a sharable container also has these properties:

exported
A Boolean value that indicates whether the sharable container is either shared or inside another container whose contents are being shared. If one of these conditions is true, the value is
true and the sharable container can be mounted or accessed remotely; if neither of these conditions is true, the value is false and the container isn't available to remote computers.
Class: Boolean
Modifiable: No
group
The name of the user or group with special access to the sharable container, as indicated in the pop-up menu labeled User/Group in the sharing window for the container.
Class: String
Modifiable: Yes
group privileges
The group privileges shown in the Sharing window for the container. For example, if the See Folders checkbox is not selected and the See Files and Make Changes checkboxes
are selected for a user or group, the value of this property is
"See Files, Make Changes" (see "Notes" on page 82).
Class: Sharing Privileges
Modifiable: Yes
guest privileges
The guest privileges shown in the sharing window for the container (that is, the settings labeled Everybody). For example, if the See Folders checkbox is not selected and the See Files
and Make Changes checkboxes are selected for Everybody, the value of this property is "See Files, Make Changes" (see "Notes" on page 82).
Class: Sharing Privileges
Modifiable: Yes
inherited privileges
A Boolean value that indicates whether the privileges for the sharable container are the same as the privileges for the container in which it is stored (true) or not (false). This property corresponds to the checkbox in the sharing window labeled "Same as enclosing folder". The value of this property is set to false if you set any of the group, guest, or owner privileges individually.
Class: Boolean
Modifiable: Yes
mounted
A Boolean value that indicates whether the sharable container is mounted on another computer's desktop (true) or not (false).
Class: Boolean
Modifiable: No
owner
The name of the sharable container's owner as indicated in the sharing window for the container.
Class: String
Modifiable: Yes
owner privileges
The owner privileges shown in the sharing window for the sharable container. For example, if the See Folders checkbox is not selected and the See Files and Make Changes checkboxes are selected for the container's owner, the value of this property is "See Files, Make Changes" (see "Notes" on page 82).
Class: Sharing Privileges
Modifiable: Yes
protected
A Boolean value that indicates whether the sharable container is protected (true) or not (false). This property corresponds to the checkbox in the sharable container's sharing window labeled "Can't be moved, renamed, or deleted".
Class: Boolean
Modifiable: Yes
shared
A Boolean value that indicates whether the sharable container and its contents are shared (true) or not (false). This property corresponds to the checkbox in the sharable container's sharing window labeled "Share this item and its contents". If the value is true, the sharable container can be mounted on the desktop of a remote computer.
Class: Boolean
Modifiable: Yes
sharing window
A reference to the sharing window for the sharable container.
Class: Reference
Modifiable: No
ELEMENT CLASSES
Objects of these classes can be identified at the top level of a sharable container by name or by number. Page numbers indicate the location of corresponding definitions in this chapter.

Accessory Suitcase (page 27)
Alias File (page 28)
Application File (page 38)
Container (page 42)
Control Panel (page 51)
Desk Accessory File (page 54)
Document File (page 59)
File (page 60)
Folder (page 62)
Font File (page 64)
Font Suitcase (page 65)
Item (page 72)
Sharable Container (page 78)
Sound File (page 86)
Suitcase (page 88)
COMMANDS HANDLED
Clean Up, Close, Copy, Count, Data Size, Delete, Duplicate, Exists, Get, Move, Open, Put Away, Reveal, Select, Sort, Update

DEFAULT VALUE CLASS RETURNED
A reference to a disk or a folder or, if you use the plural form sharable containers, a list of references.

EXAMPLE
This script changes the Shared property to false for all sharable containers that belong to a specified owner:

tell application "Finder"   set shared of sharable containers whose owner is "Greg" to false
end tell
NOTES
The properties Group Privileges, Guest Privileges, and Owner Privileges each return an object of class Sharing Privileges. You can test for a specific privilege by checking the values of the Sharing Privileges properties as described in the next section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996